var oUrls = localStorage.getItem('oUrls')
localStorage.setItem('oUrls', 'http://58.56.66.241:8801/tjzcfw/');
var PostData = null;
var getData = null;
var pageNum = 1;
var totalNum = null;
var pageSize = 10;
var viewModel = {
  List: ko.observableArray(),
  ProvinceCollection: ko.observableArray(),
  CityCollection: ko.observableArray(),
  DistrictCollection: ko.observableArray()
};
function ajaxPost(urls, obj) {
  $.ajax({
    async: false,
    type: "post",
    url: oUrls + urls,
    data: obj,
    dataType: "json",

    success: function (data) {
      PostData = data;
    },
    error: function (data) {
      alert(data)
    }
  });

}

function ajaxgetData(urls, obj) {
  $.ajax({
    async: false,
    type: "get",
    url: oUrls + urls,
    data: obj,
    dataType: "json",

    success: function (data) {
      getData = data;
    },
    error: function (data) {
      alert(data)
    }
  });

}
function ajaxGet(urls, obj, callback) {
  $.ajax({
    async: true,
    type: "get",
    url: oUrls + urls,
    data: obj,
    dataType: "json",
    beforeSend: function () {
      var loader = '<div class="ajaxLoader"><img src ="img/loading.gif"></div>';
      $("table").append(loader);
    },
    success: function (data) {
      $(".ajaxLoader").remove();
      callback(data);
    },
    error: function (data) {
      alert(data)
    }
  });
}
ko.applyBindings(
  viewModel
)